// 
//  mshare-mediaserver.vala
//  
//  Author:
//       Alexandre Rosenfeld <alexandre.rosenfeld@gmail.com>
//  
//  Copyright (c) 2011 Alexandre Rosenfeld
// 
//  This program is free software: you can redistribute it and/or modify
//  it under the terms of the GNU Lesser General Public License as published by
//  the Free Software Foundation, either version 3 of the License, or
//  (at your option) any later version.
// 
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU Lesser General Public License for more details.
// 
//  You should have received a copy of the GNU Lesser General Public License
//  along with this program.  If not, see <http://www.gnu.org/licenses/>.

public enum MediaType {
	CONTAINER,
	VIDEO,
	AUDIO,
	IMAGE
}

public interface IMediaObject : Object {
	public abstract IMediaObject parent { get; }
	public abstract MediaType media_type { get; }
	public abstract string display_name { get; }

	public abstract uint uid { get; }
}

public interface IMediaItem : IMediaObject {
	public abstract string[] urls { get; }
	public abstract string mime_type { get; }
	
	public abstract float size { get; }
	
	public abstract string artist { get; }
	public abstract string album { get; }
	public abstract string date { get; }
	public abstract string genre { get; }
}
	
public interface IVideoAudioItem : IMediaItem {
	public abstract int duration { get; }
	public abstract int bitrate { get; }
	public abstract int samplerate { get; }
	public abstract int bitspersample { get; }
}

public interface IImageItem : IMediaItem {
	public abstract int width { get; }
	public abstract int height { get; }
	public abstract int colordepth { get; }
	public abstract int pixelwidth { get; }
	public abstract int pixelheight { get; }
	public abstract IMediaItem thumbnail { get; }
}

public interface IAudioItem : IVideoAudioItem {
	public abstract IMediaItem AlbumArt { get; }
}

public interface IMediaContainer : IMediaObject {
	public signal void updated();
	
	public abstract uint child_count { get; }
	public abstract uint item_count { get; }
	public abstract uint container_count { get; }
	public abstract bool searcheable { get; } 
	
	public abstract IMediaObject[] list_children(uint offset, uint max, string[] filter);
	public abstract IMediaContainer[] list_containers(uint offset, uint max, string[]? filter);
	public abstract IMediaItem[] list_items(uint offset, uint max, string[] filter);
}

